package com.backstage.service.Impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.backstage.entity.po.SysUser;
import com.backstage.mapper.SysUserMapper;
import com.backstage.service.ISysUserService;
import com.baomidou.framework.service.impl.SuperServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangkun
 * @since 2017-11-16
 */
@Service
public class SysUserServiceImpl extends SuperServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

	@Autowired
	SysUserMapper sysUserMapper;
	
	public SysUser findSysUserByUserCode(String userCode) {
		return sysUserMapper.findSysUserByUserCode(userCode);
	}

	public Page<SysUser> selectUserList(Page<SysUser> page, String state){
		page.setRecords(sysUserMapper.selectUserList(page, state));
		return page;
	}
	
	public List<SysUser> findAllUser(){
		return sysUserMapper.findAllUser();
	}
}
